<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <link rel="stylesheet" href="/assets/amazeui/css/amazeui.min.css">
    <link rel="stylesheet" href="/assets/layui/css/layui.css">
</head>
<body>
<div class="am-g">
    <div class="am-u-sm-3">
        <button class="am-btn am-btn-primary" onclick="goUrl();">ajax-url</button>
    </div>
    <div class="am-u-sm-3 am-u-end">
        <button class="am-btn am-btn-primary" onclick="goMethod();">ajax-method</button>
    </div>
</div>
<div class="am-g">
    <div class="am-u-sm-3">
        <a class="am-btn am-btn-secondary" href="/sys/equipment/testUrl">a-url</a>
    </div>
    <div class="am-u-sm-3 am-u-end">
        <a class="am-btn am-btn-secondary" href="/sys/equipment/testMethod">a-method</a>
    </div>
</div>
<script src="/assets/amazeui/js/jquery-3.2.0.min.js"></script>
<script>

function goUrl() {
    $.ajax({
        type: 'post',
        url: '/sys/equipment/testUrl2',
        dataType: 'json',
        success: function(result){
            console.info(result);
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            console.error(textStatus);
        }
    });
}

function goMethod() {
    $.ajax({
        type: 'post',
        url: '/sys/equipment/testMethod2',
        dataType: 'json',
        success: function(result){
            console.info(result);
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            console.error(textStatus);
        }
    });
}
</script>
</body>
</html>